<%= form_for([:cpanel,@user], :html => { :enctype =>  "multipart/form-data" }) do |f| %>
   <%= render 'shared/error_messages', :target => @user %>
  <div class="clearfix">
    <%= f.label :login %>
    <div class="input">
    <%= f.text_field :login, :class => "span5" %>
    </div>
  </div>
  <div class="clearfix">
    <%= f.label :email %>
    <div class="input">
    <%= f.text_field :email, :class => "span8" %>
    </div>
  </div>
  <div class="clearfix">
    <%= f.label :location %>
    <div class="input">
    <%= f.text_field :location %>
    </div>
  </div>
  <div class="clearfix">
    <%= f.label :tagline %>
    <div class="input">
    <%= f.text_field :tagline, :class => "span13" %>
    </div>
  </div>
  <div class="clearfix">
    <%= f.label :bio %>
    <div class="input">
    <%= f.text_area :bio, :class => "span13", :style => "height:60px;" %>
    </div>
  </div>
  <div class="clearfix">
    <%= f.label :website %>
    <div class="input">
    <%= f.text_field :website, :class => "xxlarge" %>
    </div>
  </div>
  <div class="clearfix">
    <label><%= t("common.avatar")%></label>
    <div class="input">
    <%= user_avatar_tag(@user, :large) %>
    </div>
  </div>
  <div class="clearfix">
    <%= f.label :verified %>
    <div class="input">
    <%= f.check_box :verified, :class => "checkbox" %><br >
    <span class="help-inline"><%= t("cpanel.users.trust_user_can_modify_wiki")%></span>
    </div>
  </div>
  <div class="clearfix">
    <%= f.label :state %>
    <div class="input">
    <%= f.select :state, User::STATE.collect { |s| [s[0],s[1]] } %>
    </div>
  </div>  
  <div class="actions">
    <% if @user.state != User::STATE[:deleted] %>
      <div class="pull-right">
        <%= link_to '删除此用户', cpanel_user_path(@user), :confirm => '警告！此动作无法撤销，确定要删除么?', :method => :delete, :class => "btn danger"  %>
      </div>
    <% end %>
    <%= f.submit t("common.save"), :class => "btn primary", :disable_with => t("common.saving") %>
    或者
    <%= link_to 'Back', cpanel_users_path %>
  </div>
<% end %>
